-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add slash command to generate application form for various community roles #1049
base: develop
Are you sure you want to change the base?
Feat: Add slash command to generate application form for various community roles #1049
Conversation
Can i be assigned to this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branch update is required, it is using removed APIs
5c0ef6e
to
3159bed
Compare
Marked PR as draft since there needs to be some rework on certain things which will be specified in the TODO. |
cb7815a
to
042a0e0
Compare
@christolis what happens to the generated form after x user applies through form? Does the form need to be re-created? Or is it only unavailable for x user to a certain time period? Also how do we update the form if need be? |
After a discussion with the rest of the team, we decided that there are plenty of flaws with having application roles stored in the configuration file, primarily due to the fact that if somebody were to want to change the roles displayed on the dropdown menu, they would have to perform the tedious work of updating the configuration and then restarting the server, but we can do better. With this commit, all the application roles are inferred straight from the arguments that are passed from the member executing the command. A restart will not be needed in case somebody wants to change the available roles or add a new one.
This way we are able to add more roles in the future without running into any character limits. Getting the last character of the menu option ID is not the most effective way to go about this. Adding the delimiter in the menu option IDs allows us to treat the ID of the role better and in a safer way.
We want members to use the same application form when applying for roles instead of removing it once it gets used. The command to generate a form should be used once.
1a8e458
to
29c8ee6
Compare
The generated form is persistent and used by everybody. It does not need to be recreated by whoever has the |
Since application menus where users are going to apply from are going to be permanent, we need their component IDs to not expire by the cache. Previously there was a problem while testing where the already-existing menus would expire and the Discord client would complain. Refs: Together-Java#1024
Users with the right permissions could create a menu with no roles, and that would cause an error. Refs: Together-Java#1024
Closes #1024.
Screenshots
Configuration changes
applicationForm.applicationChannelPattern
applications end up.
"applications-log"
TODO
HashMap<Member, OffsetDateTime>
where the key is theMember
who sent an application and the value is the date and time that they sent it. There should be a condition every time aMember
attempts to send any application which utilizes the aforementionedHashMap
to prevent spam.Switch to(EDIT: Impossible since this would forcibly include all existing roles)EntitySelectInteractionEvent
for the dropdown menu.